set RND=%RANDOM%

set DIR_WORK=C:\DSEPROJ\Compilados\Sinacor

set ARQ_LOG_DIR=%DIR_WORK%\limpagac.dir.log.%RND%.txt
set ARQ_ERR_DIR=%DIR_WORK%\limpagac.dir.err.%RND%.txt

set ARQ_LOG_GAC=%DIR_WORK%\limpagac.gac.log.%RND%.txt
set ARQ_ERR_GAC=%DIR_WORK%\limpagac.gac.err.%RND%.txt

set DIR_GAC=C:\windows\assembly\gac
set DIR_GAC_32=C:\windows\assembly\gac_32
set DIR_GAC_MSIL=C:\windows\assembly\gac_msil

set GACUTIL=C:\gacutil.exe

rem set GACUTIL=C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe
rem set GACUTIL=C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\gacutil.exe
rem set GACUTIL=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\gacutil.exe
rem set GACUTIL=C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe
rem set GACUTIL=C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\gacutil.exe

cd %DIR_GAC%
rem pause

dir bmf*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir bvmf*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir cry*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir interop.msc* /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir interop.stm* /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir libm*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir nati*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir pse*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir quick*       /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir sina*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir stmc*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir tgp*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir xcee*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%


cd %DIR_GAC_32%
rem pause


dir bmf*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir bvmf*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir cry*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir interop.msc* /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir interop.stm* /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir libm*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir nati*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir pse*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir quick*       /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir sina*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir stmc*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir tgp*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir xcee*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%

cd %DIR_GAC_MSIL%
rem pause

dir bmf*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir bvmf*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir cry*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir interop.msc* /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir interop.stm* /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir libm*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir nati*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir pse*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir quick*       /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir sina*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir stmc*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir tgp*         /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%
dir xcee*        /b/ad 1>> %ARQ_LOG_DIR% 2>> %ARQ_ERR_DIR%

rem pause
%GACUTIL% /f /ul %ARQ_LOG_DIR% 1> %ARQ_LOG_GAC% 2> %ARQ_ERR_GAC%

rem pause
cd %DIR_WORK%
